package cn.luischen.dto;


import static org.junit.Assert.*;
import static org.mockito.ArgumentMatchers.*;
import static org.mockito.Mockito.*;
import org.junit.Rule;
import org.junit.runner.RunWith;
import org.junit.rules.ExpectedException;
import org.junit.Test;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.modules.junit4.PowerMockRunner;
import org.powermock.reflect.Whitebox;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.mockito.stubbing.Answer;
import java.lang.reflect.Method;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.TypeReference;
import com.alibaba.fastjson.parser.ParserConfig;
import java.util.Map;
import java.util.List;
import com.unitspirit.runtime.*;
/**
 * The class contains tests for the class cn.luischen.dto.StatisticsDto.
*
* @generatedBy UnitSpirit CreateTemplateTestFile4
* @version 1.0.9.11 
*/
@PowerMockIgnore({"javax.management.*"})
public class StatisticsDto_getLinks_WGTest {
  @Rule  
  public ExpectedException unitspirit_thrown= ExpectedException.none();
  /**
  * 测试方法初始化.
  * 
  * @throws Exception 
  *         if the initialization fails for some reason 
  *  
  * @generatedBy UnitSpirit at 2021-12-08 11:01:24
  */  
 @org.junit.Before 
  public void setUp()  throws Exception 
  { 
    try{
    GlobalUnitInit.init(); 
    MockitoAnnotations.initMocks(this);
   ParserConfig.getGlobalInstance().setAutoTypeSupport(true);
}catch(Exception ex){
  ex.printStackTrace();
}
  }



  /**
  * @date 2021-12-08 11:01:25
  * @see cn.luischen.dto.StatisticsDto#getLinks
  * @category auto generate by UnitSpirit  
  * @author UnitSpirit   
  */
  @Test
  public void test_getLinks_0113_190013_913_1_00() throws Throwable {
    
cn.luischen.dto.StatisticsDto unitspirit_fixture=new  cn.luischen.dto.StatisticsDto();
  //成员变量设置
    Whitebox.setInternalState(unitspirit_fixture,"attachs",0L);
    Whitebox.setInternalState(unitspirit_fixture,"comments",0L);
    Whitebox.setInternalState(unitspirit_fixture,"links",0L);
    Whitebox.setInternalState(unitspirit_fixture,"articles",0L);


    //返回值定义 
    String result_expected = "0";



    Long unitspirit_result_d = 0L;
   unitspirit_fixture.setLinks(unitspirit_result_d);
    Long  unitspirit_result =  unitspirit_fixture.getLinks();
    UnitAssert.assertEquals(result_expected,UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
  }
  /**
  * @date 2021-12-08 11:01:25
  * @see cn.luischen.dto.StatisticsDto#getLinks
  * @category auto generate by UnitSpirit  
  * @author UnitSpirit   
  */
  @Test
  public void test_getLinks_0707_204349_158_1_00() throws Throwable {
    
cn.luischen.dto.StatisticsDto unitspirit_fixture=new  cn.luischen.dto.StatisticsDto();
  //成员变量设置


    //返回值定义 
    String result_expected = "1";



    Long unitspirit_result_d = 1L;
   unitspirit_fixture.setLinks(unitspirit_result_d);
    Long  unitspirit_result =  unitspirit_fixture.getLinks();
    UnitAssert.assertEquals(result_expected,UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
  }
  /**
  * @date 2021-12-08 11:01:25
  * @see cn.luischen.dto.StatisticsDto#getLinks
  * @category auto generate by UnitSpirit  
  * @author UnitSpirit   
  */
  @Test
  public void test_getLinks_0831_205520_230_0_1_00() throws Throwable {
    
cn.luischen.dto.StatisticsDto unitspirit_fixture=new  cn.luischen.dto.StatisticsDto();
  //成员变量设置


    //返回值定义 
    String result_expected = "1";



    Long unitspirit_result_d = 1L;
   unitspirit_fixture.setLinks(unitspirit_result_d);
    Long  unitspirit_result =  unitspirit_fixture.getLinks();
    UnitAssert.assertEquals(result_expected,UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
  }
  /**
  * @date 2021-12-08 11:01:25
  * @see cn.luischen.dto.StatisticsDto#getLinks
  * @category auto generate by UnitSpirit  
  * @author UnitSpirit   
  */
  @Test
  public void test_getLinks_0914_100957_696_1_00() throws Throwable {
    
cn.luischen.dto.StatisticsDto unitspirit_fixture=new  cn.luischen.dto.StatisticsDto();
  //成员变量设置
    Whitebox.setInternalState(unitspirit_fixture,"attachs",0L);
    Whitebox.setInternalState(unitspirit_fixture,"comments",0L);
    Whitebox.setInternalState(unitspirit_fixture,"links",2L);
    Whitebox.setInternalState(unitspirit_fixture,"articles",3L);


    //返回值定义 
    String result_expected = "2";



    Long unitspirit_result_d = 2L;
   unitspirit_fixture.setLinks(unitspirit_result_d);
    Long  unitspirit_result =  unitspirit_fixture.getLinks();
    UnitAssert.assertEquals(result_expected,UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
  }
  /**
  * @date 2021-12-08 11:01:25
  * @see cn.luischen.dto.StatisticsDto#getLinks
  * @category auto generate by UnitSpirit  
  * @author UnitSpirit   
  */
  @Test
  public void test_getLinks_0930_100641_841_1_00() throws Throwable {
    
cn.luischen.dto.StatisticsDto unitspirit_fixture=new  cn.luischen.dto.StatisticsDto();
  //成员变量设置
    Whitebox.setInternalState(unitspirit_fixture,"attachs",0L);
    Whitebox.setInternalState(unitspirit_fixture,"comments",0L);
    Whitebox.setInternalState(unitspirit_fixture,"links",0L);
    Whitebox.setInternalState(unitspirit_fixture,"articles",0L);


    //返回值定义 
    String result_expected = "0";



    Long unitspirit_result_d = 0L;
   unitspirit_fixture.setLinks(unitspirit_result_d);
    Long  unitspirit_result =  unitspirit_fixture.getLinks();
    UnitAssert.assertEquals(result_expected,UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
  }
}